import { ajax } from './ajax.js'

const projectName = window.config.projectName

/**
 * 保存用户信息
*/
async function saveUserInfo(params) {
    let saveUserInfo = await ajax.post(projectName + 'rest/user/saveUserInfo', params)
    return saveUserInfo
}
/**
 * 完成某个步骤
*/
async function modifiedStep(params) {
    let modifiedStep = await ajax.post(projectName + 'rest/user/modifiedStep', params)
    return modifiedStep
}
/**
 * 分页获取寝室列表数据
*/
async function getDormitoryListByKsh(params) {
    let getDormitoryListByKsh = await ajax.post(projectName + 'rest/user/getDormitoryListByKsh', params)
    return getDormitoryListByKsh
}
/**
 * 确认选择寝室
*/
async function comfirmDormitory(params) {
    let comfirmDormitory = await ajax.post(projectName + 'rest/user/comfirmDormitory', params)
    return comfirmDormitory
}
/**
 * 电子注册单
 */

async function getRegistInfo(params) {
    let getRegistInfo = await ajax.post(projectName + 'rest/user/getRegistrationFormByKsh', params)
    return getRegistInfo
}
export default {
    saveUserInfo,
    modifiedStep,
    getDormitoryListByKsh,
    comfirmDormitory,
    getRegistInfo
}
